package org.tea.inventory.model.dto.post;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.tea.inventory.base.validation.groups.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author hanzy
 * @description
 * @date 2023年10月30日 16:40
 */
@Data
@ApiModel(value = "帖子表单")
public class BasePostDTO {
    @ApiModelProperty(value = "id")
    @NotNull(message = "id不能为空", groups = {UpdateGroup.class})
    private Integer id;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @NotBlank(message = "用户不能为空")
    private String loginId;

    @ApiModelProperty(value = "标题",required = true)
    @NotBlank(message = "标题不能为空")
    private String title;

    @ApiModelProperty(value = "内容",required = true)
    @NotBlank(message = "内容不能为空")
    private String content;

    @ApiModelProperty(value = "文件")
    private String media;

    @ApiModelProperty(value = "置顶")
    private Integer postTop;

    @ApiModelProperty(value = "帖子类型：1 图文 ，2视频 ，3文章，4投票 5.问卷调查"  ,required = true)
    @NotNull(message = "帖子类型不能为空")
    private Integer type;

    @ApiModelProperty(value = "积分",required = true)
    private Integer integral;

    @ApiModelProperty(value = "参与人员")
    private List<String> participants;
}
